<!DOCTYPE html>
<html>
	<head>
	  	<meta charset="utf-8">
	  	<title>发码活动</title>
		<link rel="stylesheet" href="common/js/datepicker/bootstrap-datepicker.css">
		<link rel="stylesheet" href="common/js/file-input/fileinput.css">
	</head>
	<body>   
	   <section class="main padder">
	   		<div class="clearfix">
	        	<h4><i class="icon-list-ul"></i> 发码活动</h4>
      		</div>
	    	<div class="clearfix">
		        <ul class="breadcrumb">
		           <li><a href="#"><i class="icon-home"></i>首页</a></li>
		           <li class="backToList"><a href="#"><i class="icon-list-ul"></i>活动管理</a></li>
		           <li class="active">发码活动</li>
		       	</ul>
	      	</div>
			<form id="addActivityFamaForm" class="form-horizontal activityDetail" >
				<div class="row" style="margin:0;">
					<div class="panel clearfix">
						<header class="panel-heading bg-white">活动内容</header>
						<input type="hidden" name="id">
						<input type="hidden" name="type" value="02">

						<div class="form-group">
							<label class="col-lg-2 control-label">活动名称</label>
							<div class="col-lg-4">
								<input type="text" tabindex="1" class="form-control input-small parsley-validated"
									   data-parsley-required="true" placeholder="活动名称" data-parsley-maxlength="30" name="name">
							</div>
							<label class="col-lg-2 control-label">活动编码</label>
							<div class="col-lg-4">
								<input type="text" disabled readonly tabindex="2" class="form-control input-small" placeholder="系统自动生成" id="code">
							</div>
						</div>

						<div class="form-group">
							<label class="col-lg-2 control-label">网关关联编码</label>
							<div class="col-lg-4">
								<input type="text" tabindex="3" class="form-control input-small parsley-validated"  placeholder="网关关联编码" data-parsley-maxlength="30" name="outCode" data-parsley-type="alphanum">
							</div>
						</div>
					</div>
					<div class="panel clearfix">
						<header class="panel-heading bg-white">活动发行方及合同</header>
						<div class="form-group">
							<label class="col-lg-2 control-label">活动发行方</label>
							<div class="col-lg-4">
								<select tabindex="4" class="form-control input-small" data-parsley-required="true" name="enterpriseId" code="ENTERPRISE">
									<option value="" selected>请选择活动发行方</option>
								</select>
							</div>
							<label class="col-lg-2 control-label">选择合同</label>
							<div class="col-lg-4">
								<select tabindex="5" class="form-control input-small" data-parsley-required="true" name="contractId" code="CONTRACT">
									<option value="" selected>请选择活动对应的合同编号</option>
								</select>
							</div>
						</div>
					</div>
					<div class="panel clearfix">
						<header class="panel-heading bg-white">面值</header>
						<div class="form-group">
							<label class="col-lg-2 control-label">面值</label>

							<div class="col-lg-4">
								<input type="text" tabindex="6" class="form-control input-small parsley-validated"
									   data-parsley-required="true" placeholder="元" data-parsley-type="integer" data-parsley-min="0" name="amount">
							</div>
						</div>
					</div>
					<div class="panel clearfix">
						<header class="panel-heading bg-white">兑换渠道</header>
						<div class="form-group">
							<label class="col-lg-2 control-label">兑换渠道</label>
							<label class="col-lg-10 parentNode active">
								<label class="col-lg-2 childNode">
									<div class="checkbox">
										<label class="checkbox-custom">
											<input type="checkbox" name="exchangeChannel" data-parsley-required="true" data-parsley-mincheck="1"   value="1">
											<i class="icon-unchecked "></i>
											网关
										</label>
									</div>
								</label>
								<div class="col-lg-2 childNode">
									<div class="checkbox">
									  	<label class="checkbox-custom">
											<input type="checkbox"  name="exchangeChannel" value="2">
											<i class="icon-unchecked "></i>
										  	手机充值
									  	</label>
									</div>
								</div>
							</label>
						</div>
					</div>
					<div class="panel clearfix">
						<header class="panel-heading bg-white">小票内容</header>

						<div class="form-group">
							<label class="col-lg-2 control-label">小票标题</label>

							<div class="col-lg-4">
								<input type="text" tabindex="7" class="form-control input-small parsley-validated"
									   data-parsley-required="true" placeholder="小票标题" name="receiptTitle">
							</div>
							<label class="col-lg-2 control-label">小票打印内容</label>
							<div class="col-lg-4">
							<textarea tabindex="8" class="form-control parsley-validated" data-parsley-rangelength="[1,200]"
									  data-parsley-trigger="keyup" rows="3" data-parsley-required="true" placeholder="小票打印内容"
									  name="receiptPrint"></textarea>
									  <a href="mb.html" target="_blank">模板变量说明</a>
							</div>
						</div>
					</div>
					<div class="panel clearfix">
						<header class="panel-heading bg-white">验证信息设定</header>
						<div class="form-group">
							<label class="col-lg-2 control-label">POS验证成功提示</label>
							<div class="col-lg-4">
								<input type="text" tabindex="9" class="form-control input-small parsley-validated"
									   data-parsley-required="true" placeholder="POS验证成功提示" name="posSuccessMsg">
							</div>
							<label class="col-lg-2 control-label">验证成功通知短信</label>

							<div class="col-lg-4">
								<input type="text" tabindex="10" class="form-control input-small parsley-validated"
									   data-parsley-required="true" placeholder="验证成功通知短信" name="successSmsMsg">
							</div>
						</div>
					</div>
					<div class="panel clearfix">
						<header class="panel-heading bg-white">码发放渠道设定</header>
						<div class="form-group">
							<label class="col-lg-2">
								<div class="radio" style="text-align: right;">
									<label class="radio-custom">
										<input type="radio" id="channelDownload" name="downloadChannel" data-parsley-required="true">
										<i class="icon-circle-blank"></i>
										下载文件
									</label>
								</div>
							</label>
							<label class="col-lg-10 parentNode">
								<label class="col-lg-3">
									<div class="radio">
										<label class="radio-custom">
											<input type="radio" id="channelSend" name="downloadChannel">
											<i class="icon-circle-blank"></i>
											直接发送
										</label>
									</div>
								</label>
								<label class="col-lg-3 childNode">
									<div class="checkbox">
										<label class="checkbox-custom">
											<input type="checkbox" id="duanxin" >
											<i class="icon-unchecked "></i>
											短信发码
										</label>
									</div>
								</label>
								<div class="col-lg-4 childNode">
									<div class="checkbox">
									  	<label class="checkbox-custom">
											<input type="checkbox"  id="caixin">
											<i class="icon-unchecked "></i>
										  	彩信发码
									  	</label>
									</div>
								</div>
								<!--
								<div class="col-lg-4 childNode">
									<div class="checkbox">
									  <label class="checkbox-custom">
										<input type="checkbox"  id="weixin">
										<i class="icon-unchecked "></i>
										  微信发码
									  </label>
									</div>
								</div>
								-->
							</label>
						</div>
						<div class="form-group" id="duanxinFama" style="display:none">
							<label class="col-lg-2 control-label">短信发码设定</label>

							<div class="col-lg-8">
							<textarea class="form-control parsley-validated" rows="3" placeholder="短信发码设定" ></textarea>
							<label style="font-weight: normal;">注：可以用<a onclick="addmark('$name')" style="color: blue;">$name</a>代替用户名；用<a onclick="addmark('$pwd')" style="color: blue;">$pwd</a>代替验证密码；用<a onclick="addmark('$f1')" style="color: blue;">$f1</a>代替扩展字段1；用<a onclick="addmark('$f2')" style="color: blue;">$f2</a>代 替扩展字段2；用<a onclick="addmark('$f3')" style="color: blue;">$f3</a>代替扩展字段3；</label>	
							</div>
						</div>
						<div class="form-group" id="caixinFama" style="display:none" >
							<div class="col-lg-2"> </div>
							<div class="col-lg-10">
								<div class="caixin-left col-lg-3">
									<div class="caixin-left-inner">
										<div class="caixin-inner-pic"></div>
										<div class="caixin-inner-txt"></div>
									</div>
								</div>
								<input type="hidden" name="endJson" id="endJson" data-json='' value="">
								<input type="hidden" id="imgSrc" value="">
								<input type="hidden" id="identifier" value="">
								<div class="caixin-right col-lg-9">
									<div class="form-group">
										<label class="col-lg-2 control-label">彩信标题</label>
										<div class="col-lg-4">
											<input type="text" tabindex="9" class="form-control input-small parsley-validated"
												   placeholder="彩信标题" id="subject" name="subject">
										</div>
										<div class="col-lg-2">
											<div class="checkbox">
												<label class="checkbox-custom">
													<input type="checkbox" value="1" id="isresend">
													<i class="icon-unchecked "></i>
													自动补发
												</label>
											</div>
										</div>
										<div class="col-lg-4">
											字节数：总大小不能超过60K
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 control-label">帧控制</label>
										<div class="col-lg-4">
											<select tabindex="4" class="form-control input-small" id="frame-select" data-parsley-required="true" name="" code="">
											</select>
										</div>
										<div class="col-lg-2">
											<button class="btn btn-default " type="button" id="addFrame">添加一帧</button>
										</div>
										<div class="col-lg-2">
											<button class="btn btn-default " type="button" id="saveFrame">保存当前帧</button>
										</div>
										<div class="col-lg-2">
											<button class="btn btn-default " type="button" id="deleteFrame">删除当前帧</button>
										</div>
									</div>

									<div class="form-group">
										<label class="col-lg-2 control-label">图片</label>
										<div class="col-lg-3">
											<!--<button class="btn btn-info" type="button" id="choosePic">选择图片</button>-->
											<!--<form id="file-form" enctype='multipart/form-data'>-->

												<input type="file" name="file" id="file-upload"  class="file-loading">
											<!--</form>-->
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 control-label">文字</label>
										<div class="col-lg-4">
											<textarea  rows="5" id="input-text" class="form-control"></textarea>
										</div>
										<div class="col-lg-6 uilg-caixin-fama">
											注：可以用<span>$name</span>代替用户名；用<span>$pwd</span>代替验证密码；用<span>$f1</span>代替扩展字段1；用<span>$f2</span>代替扩展字段2；用<span>$f3</span>代替扩展字段3；
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 control-label">将二维码插入</label>
										<div class="col-lg-4">
											<select tabindex="4" class="form-control input-small" id="code-select" data-parsley-required="true" name="" code="">
											</select>
										</div>

									</div>
								</div>
							</div>
						</div>
						<div class="form-group" id="weixinFama" style="display:none">
							<label class="col-lg-2 control-label">微信发码设定</label>

							<div class="col-lg-8">
							<textarea class="form-control parsley-validated" rows="3" placeholder="微信发码设定"></textarea>
							</div>
						</div>
					</div>
					<div class="panel clearfix">
						<header class="panel-heading bg-white">日期设定</header>
						<div class="form-group">
							<label class="col-lg-2 control-label">活动开始日期</label>

							<div class="col-lg-4">
								<input id="date1" tabindex="11"  readonly="readonly" data-parsley-trigger="change" class="input-small form-control datepicker" data-parsley-required="true" type="text"
									   value="" size="16" name="startTime">
							</div>
							<label class="col-lg-2 control-label">活动截止日期</label>

							<div class="col-lg-4">
								<input id="date2" tabindex="12"  readonly="readonly" data-parsley-trigger="change" class="input-small form-control datepicker" data-parsley-required="true"type="text"
									   value="" size="16" name="endTime">
							</div>
						</div>
						<div id="selectDateFamaCheckboxFormGroup" class="form-group">
							<label class="col-lg-2 control-label">活动日期选择</label>

							<div class="col-lg-8 weekCheck clearfix">
								<div class="checkbox">
									<label class="checkbox-custom">
										<input type="checkbox" value="1" name="aaaa" data-parsley-required="true" data-parsley-mincheck="1">
										<i class="icon-unchecked "></i>
										星期一
									</label>
								</div>
								<div class="checkbox">
									<label class="checkbox-custom">
										<input type="checkbox" name="aaaa" value="2">
										<i class="icon-unchecked "></i>
										星期二
									</label>
								</div>
								<div class="checkbox">
									<label class="checkbox-custom">
										<input type="checkbox" name="aaaa" value="3">
										<i class="icon-unchecked "></i>
										星期三
									</label>
								</div>
								<div class="checkbox">
									<label class="checkbox-custom">
										<input type="checkbox" name="aaaa" value="4">
										<i class="icon-unchecked "></i>
										星期四
									</label>
								</div>
								<div class="checkbox">
									<label class="checkbox-custom">
										<input type="checkbox" name="aaaa" value="5">
										<i class="icon-unchecked "></i>
										星期五
									</label>
								</div>
								<div class="checkbox">
									<label class="checkbox-custom">
										<input type="checkbox" name="aaaa" value="6">
										<i class="icon-unchecked "></i>
										星期六
									</label>
								</div>
								<div class="checkbox">
									<label class="checkbox-custom">
										<input type="checkbox" name="aaaa" value="7">
										<i class="icon-unchecked "></i>
										星期日
									</label>
								</div>
							</div>

						</div>
					</div>
					<div class="panel clearfix" style="position:relative;">
						<header class="panel-heading bg-white">适用于门店</header>
						<button type="button" class="btn btn-default col-lg-12 chooseShop popEnter" href="#">选择门店</button>
						<div class="popover top choosedPop">
							<div class="arrow"></div>
							<h3 class="popover-title">已选门店</h3>
							<div class="popover-content choosedStore">

							</div>
						</div>
					</div>
				</div>
				<div class="row add">
					<button type="button" class="btn btn-default backToList">取 消</button>
					<button id="addActivityFamaSubmitButton" type="button" class="btn btn-primary">确 认</button>
				</div>
				<div class="row look">
					<button type="button" class="btn btn-default backToList">返回</button>
					<button type="button" class="btn btn-info toModify">编辑</button>
				</div>
			</form>
		</section>
	   <div id="shopWrap"></div>
	   <script src="common/js/own/city.js" type="text/javascript"></script>
	   <script src="common/js/datepicker/bootstrap-datepicker.min.js" type="text/javascript"></script>
	   <script src="common/js/datepicker/bootstrap-datepicker.zh-CN.min.js" type="text/javascript"></script>
	   <script src="common/js/file-input/fileinput.js" type="text/javascript"></script>
	   <script src="common/js/jquery-form.js" type="text/javascript"></script>
	   <script src="common/js/own/caixinFama.js" type="text/javascript"></script>
	   <script src="common/js/own/fama.js" type="text/javascript"></script>
	   <script>
			$.caixinFama();
		</script>
	</body>
</html>